package com.example.Tousu.service.impl;

import com.example.Tousu.domain.Tousu;
//import com.example.Tousu.domain.TousuStasus;
import com.example.Tousu.mapper.TousuMapper;
import com.example.Tousu.service.ITousuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TousuServiceImpl implements ITousuService {
    @Autowired
    private TousuMapper tousuMapper;

    /**
     * 查询用户
     *
     * @param tousu
     * @return
     */
    @Override
    public List<Tousu> selectTousu(Tousu tousu) {
        return tousuMapper.selectTousu(tousu);
    }

    /**
     * 新增用户
     * @param tousu
     */
    @Override
    public void insertTousu(Tousu tousu) {
        tousuMapper.insertTousu(tousu);
    }

    /**
     * 修改用户
     * @param tousu
     */
    @Override
    public void updateTousuById(Tousu tousu) {
        tousuMapper.updateTousuById(tousu);
    }
//    @Override
//    public void updateStasusById(TousuStasus tousuStasus){tousuMapper.updateStasusById(tousuStasus);}
    /**
     * 删除用户
     * @param id
     */
    @Override
    public void delTousuById(String id) {
        tousuMapper.delTousuById(id);
    }

//    @Override
//    public Tousu selectOneTousu(Tousu tousu) {
//        return tousuMapper.selectOneTousu(tousu);
//    }

}
